import request from '@/utils/request'
function getUrl(url) { return '/api/' + url }







//添加企业信息
export function addInEnterprise(data) {
    return request({
        url: getUrl("admin/enterprise/addInEnterprise"),
        method: 'post',
        data
    })
}

//更新企业信息
export function updateInEnterprise(data) {
    return request({
        url: getUrl("admin/enterprise/updateInEnterprise"),
        method: 'post',
        data
    })
}


export function deleteInEnterprise(data) {
    return request({
        url: getUrl("admin/enterprise/deleteInEnterprise"),
        method: 'post',
        data
    })
}


//获取企业信息数据 getInEnterpriseVo
export function getInEnterpriseVo(data) {
    return request({
        url: getUrl("admin/enterprise/getInEnterpriseVo"),
        method: 'post',
        data
    })
}

export function getInEnterpriseList(data) {
    return request({
        url: getUrl("admin/enterprise/getList"),
        method: 'post',
        data
    })
}

//生成火情信息并发送通知
export function generateFire(data) {
    return request({
        url: getUrl("admin/user/generateFire"),
        method: 'post',
        data
    })
}



//添加用户信息
export function addInUser(data) {
    return request({
        url: getUrl("admin/user/addInUser"),
        method: 'post',
        data
    })
}


//添加用户信息
export function addInAdmin(data) {
    return request({
        url: getUrl("admin/user/addInAdmin"),
        method: 'post',
        data
    })
}

//更新用户信息
export function updateInUser(data) {
    return request({
        url: getUrl("admin/user/updateInUser"),
        method: 'post',
        data
    })
}

//更新用户信息
export function updateMobile(data) {
    return request({
        url: getUrl("admin/user/updateMobile"),
        method: 'post',
        data
    })
}

//更新用户信息
export function updatePassword(data) {
    return request({
        url: getUrl("admin/user/updatePassword"),
        method: 'post',
        data
    })
}


export function deleteInUser(data) {
    return request({
        url: getUrl("admin/user/deleteInUser"),
        method: 'post',
        data
    })
}


//获取用户信息数据 getInUserVo
export function getInUserVo(data) {
    return request({
        url: getUrl("admin/user/getInUserVo"),
        method: 'post',
        data
    })
}

export function getInUserList(data) {
    return request({
        url: getUrl("admin/user/getInUserList"),
        method: 'post',
        data
    })
}


export function addInPlaceInfo(data) {
    return request({
        url: getUrl("admin/place/addInPlaceInfo"),
        method: 'post',
        data
    })
}

export function updateInPlaceInfo(data) {
    return request({
        url: getUrl("admin/place/updateInPlaceInfo"),
        method: 'post',
        data
    })
}

export function getInPlaceInfo(data) {
    return request({
        url: getUrl("admin/place/getInPlaceInfo"),
        method: 'post',
        data
    })
}

export function deleteInPlaceInfo(data) {
    return request({
        url: getUrl("admin/place/deleteInPlaceInfo"),
        method: 'post',
        data
    })
}



export function getFireDistance(data) {
    return request({
        url: getUrl("admin/enterprise/getFireDistance"),
        method: 'post',
        data
    })
}

//添加主体信息
export function addInEnterpriseDominant(data) {
    return request({
        url: getUrl("admin/enterpriseDominant/addInEnterpriseDominant"),
        method: 'post',
        data
    })
}

//更新主体信息
export function updateInEnterpriseDominant(data) {
    return request({
        url: getUrl("admin/enterpriseDominant/updateInEnterpriseDominant"),
        method: 'post',
        data
    })
}



//获取主体信息数据 getInEnterpriseDominantVo
export function getInEnterpriseDominantVo(data) {
    return request({
        url: getUrl("admin/enterpriseDominant/getInEnterpriseDominantVo"),
        method: 'post',
        data
    })
}

//获取企业的建筑信息数据 getBuildList
export function getBuildList(data) {
    return request({
        url: getUrl("admin/enterprise/getBuildList"),
        method: 'post',
        data
    })
}

//获取企业的区域信息 getRegionList
export function getRegionList(data) {
    return request({
        url: getUrl("admin/enterprise/getRegionList"),
        method: 'post',
        data
    })
}

export function deleteInRegion(data) {
    return request({
        url: getUrl("admin/enterprise/deleteRegion"),
        method: 'post',
        data
    })
}

export function addInRegion(data) {
    return request({
        url: getUrl("admin/enterprise/addInRegion"),
        method: 'post',
        data
    })
}

export function getInRegionVo(data) {
    return request({
        url: getUrl("admin/enterprise/getInRegionVo"),
        method: 'post',
        data
    })
}

export function updateInRegion(data) {
    return request({
        url: getUrl("admin/enterprise/updateInRegion"),
        method: 'post',
        data
    })
}

export function exportInUser(data){
    return request({
        url: getUrl("admin/user/exportInUser"),
        method: 'post',
        responseType: "blob",
        data
    })
}
